package com.mustafaiev.tair.cts.tapestry.dto;

import java.util.Date;
import java.util.List;

import com.mustafaiev.tair.cts.enums.BasketType;

/**
 * @author tair
 * 
 */
public class BasketDTO {

    private Long id;

    private PayerDTO payer;

    private Date date;

    private BasketType type;

    private List<PurchaseDTO> purchases;

    private String marketName;

    private String comments;

    public Long getId() {
        return id;
    }

    public void setId(final Long id) {
        this.id = id;
    }

    public PayerDTO getPayer() {
        return payer;
    }

    public void setPayer(final PayerDTO payer) {
        this.payer = payer;
    }

    public String getPayerFirstname() {
        if (payer != null) {
            return payer.getFirstname();
        }
        return "";
    }

    public String getPayerLastname() {
        if (payer != null) {
            return payer.getLastname();
        }
        return "";
    }

    public Date getDate() {
        return date;
    }

    public void setDate(final Date date) {
        this.date = date;
    }

    public BasketType getType() {
        return type;
    }

    public void setType(final BasketType type) {
        this.type = type;
    }

    public List<PurchaseDTO> getPurchases() {
        return purchases;
    }

    public void setPurchases(final List<PurchaseDTO> purchaseList) {
        this.purchases = purchaseList;
    }

    public String getMarketName() {
        return marketName;
    }

    public void setMarketName(final String marketName) {
        this.marketName = marketName;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(final String comments) {
        this.comments = comments;
    }

}
